<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">MLCGMM</b>
<td valign="baseline" align="right" class="function"><a href="../../probab/estimation/index.html" target="mdsdir"><img border = 0 src="../../up.gif"></a></table>
  <p><b>Maximal Likelihood estimation of Gaussian mixture model.</b></p>
  <hr>
<div class='code'><code>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;mlcgmm(X)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;mlcgmm(X,cov_type)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;mlcgmm(data)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;mlcgmm(data,cov_type)</span><br>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;It&nbsp;computes&nbsp;Maximum&nbsp;Likelihood&nbsp;estimation&nbsp;of&nbsp;parameters</span><br>
<span class=help>&nbsp;&nbsp;of&nbsp;Gaussian&nbsp;mixture&nbsp;model&nbsp;for&nbsp;given&nbsp;labeled&nbsp;data&nbsp;sample</span><br>
<span class=help>&nbsp;&nbsp;(complete&nbsp;data).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;mlcgmm(X)&nbsp;computes&nbsp;parameters&nbsp;(model.Mean,model.Cov)</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;of&nbsp;a&nbsp;single&nbsp;Gaussian&nbsp;distribution&nbsp;for&nbsp;given&nbsp;sample&nbsp;of&nbsp;column&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;vectors&nbsp;X&nbsp;(all&nbsp;labels&nbsp;are&nbsp;assumed&nbsp;to&nbsp;be&nbsp;1).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;mlcgmm(X,cov_type)&nbsp;specifies&nbsp;shape&nbsp;of&nbsp;covariance&nbsp;matrix:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;cov_type&nbsp;=&nbsp;'full'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;full&nbsp;covariance&nbsp;matrix&nbsp;(default)</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;cov_type&nbsp;=&nbsp;'diag'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;diagonal&nbsp;covarinace&nbsp;matrix</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;cov_type&nbsp;=&nbsp;'spherical'&nbsp;spherical&nbsp;covariance&nbsp;matrix</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;mlcgmm(data)&nbsp;computes&nbsp;parameters&nbsp;of&nbsp;a&nbsp;Gaussian&nbsp;mixture&nbsp;model</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;from&nbsp;a&nbsp;given&nbsp;labeled&nbsp;data&nbsp;sample</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data.X&nbsp;...&nbsp;samples,</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data.y&nbsp;..&nbsp;labels.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;It&nbsp;estimates&nbsp;parameters&nbsp;of&nbsp;ncomp=max(data.y)&nbsp;Gaussians&nbsp;and</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;a&nbsp;priory&nbsp;probabilities&nbsp;Prior&nbsp;[1&nbsp;x&nbsp;ncomp]&nbsp;using&nbsp;Maximum-Likelihood&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;principle.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Data&nbsp;sample.</span><br>
<span class=help>&nbsp;&nbsp;data.X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Data&nbsp;sample.</span><br>
<span class=help>&nbsp;&nbsp;data.y&nbsp;[1&nbsp;x&nbsp;num_data]&nbsp;Data&nbsp;labels.</span><br>
<span class=help>&nbsp;&nbsp;cov_type&nbsp;[string]&nbsp;Type&nbsp;of&nbsp;covariacne&nbsp;matrix&nbsp;(see&nbsp;above).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Estimated&nbsp;Gaussian&nbsp;mixture&nbsp;model:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Mean&nbsp;[dim&nbsp;x&nbsp;ncomp]&nbsp;Mean&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Cov&nbsp;[dim&nbsp;x&nbsp;dim&nbsp;x&nbsp;ncomp]&nbsp;Covariance&nbsp;matrices.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Prior&nbsp;[1&nbsp;x&nbsp;ncomp]&nbsp;Estimated&nbsp;a&nbsp;priory&nbsp;probabilities.</span><br>
<span class=help>&nbsp;&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;data&nbsp;=&nbsp;load('riply_trn');</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;mlcgmm(&nbsp;data&nbsp;);</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;hold&nbsp;on;&nbsp;ppatterns(data);&nbsp;pgauss(&nbsp;model&nbsp;);</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;hold&nbsp;on;&nbsp;ppatterns(data);&nbsp;pgmm(&nbsp;model&nbsp;);</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=also_field>See also </span><span class=also></span><br>
<span class=help><span class=also>&nbsp;&nbsp;<a href = "../../probab/estimation/emgmm.html" target="mdsbody">EMGMM</a>,&nbsp;<a href = "../../probab/estimation/mmgauss.html" target="mdsbody">MMGAUSS</a>,&nbsp;<a href = "../../probab/pdfgmm.html" target="mdsbody">PDFGMM</a>.</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../../probab/estimation/list/mlcgmm.html">mlcgmm.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 17-aug-2004, VF, labels y do not have to form a sequence 1,2,...,max_y<br>
 2-may-2004, VF<br>
 29-apr-2004, VF<br>
 19-sep-2003, VF<br>
 27-feb-2003, VF<br>

</body>
</html>
